/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MyClass;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

/**
 *
 * @author HuuTai_it
 */
public class Help extends Canvas{ 
    
    private Control control;
    private Image help = Image.createImage("/MyPicture/helpscreen.png");
    
    public Help(Control control) throws Exception {        
        setFullScreenMode(true);
        this.control = control;
    }
    
    public void paint(Graphics g) {

        g.drawImage(help, 0, 0,  Graphics.TOP | Graphics.LEFT);
    }
    
    public void keyPressed(int keyCode) {
        
        switch(getGameAction(keyCode)) {
                
            case FIRE:
                control.select();
                control.showMainMenu();
                break;
        }        
    }    
}  